Skip to content

docs(architecture): concurrent config-write safety (#5) - #27

Merged
robercano-ghbot merged 2 commits into
mainfrom
feat/issue-5-concurrency-doc
Jul 1, 2026
Merged

docs(architecture): concurrent config-write safety (#5)#27
robercano-ghbot merged 2 commits into
mainfrom
feat/issue-5-concurrency-doc

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

What

Adds a "Concurrent config-write safety" subsection to docs/ARCHITECTURE.mdLimits to respect.

Covers the anthropics/claude-code#29217 concern (non-atomic concurrent writes to ~/.claude.json), which matters because this template fans out to parallel worktree workers:

  • Probe finding: did not reproduce on v2.1.153/WSL2 (6+ parallel subagents); #29217 was a v2.1.59–62/Windows report, now closed-stale — appears safe at modest concurrency but version/platform-dependent.
  • Mitigations: keep max_parallel_workers low (the 2–4 ceiling already advised; self-adapter ships 2), no concurrent sessions from the same home dir, keep Claude Code updated.
  • Residual risk this template owns: mid-run rewrites of the working-tree .claude/settings.json — mitigated by the pre-approved allow-list + the implementer rule to stage explicit paths only (never git add -A).

Framed explicitly as an upstream concern the template documents/mitigates, not fixes.

Scope

Docs-module slice of #5 (adapter .claude/self/gates.json, module docs). The implementer staging rule referenced here already landed in #21. Single file: docs/ARCHITECTURE.md.

Gates

GATES_FILE=.claude/self/gates.json build + lint + test all green.

Review

Reviewer lenses per self-adapter (correctness, tests), consensus=all: both approved (high confidence). Second commit addresses both lenses' shared non-blocking nit (aligned the max_parallel_workers phrasing).

Closes #5.

🤖 Generated with Claude Code

robercano and others added 2 commits July 1, 2026 21:41
Adds a "Concurrent config-write safety" subsection to ARCHITECTURE.md → Limits:
links anthropics/claude-code#29217, the probe finding (didn't repro on v2.1.153),
mitigations (max_parallel_workers 2-3, no concurrent sessions, keep updated), and
the residual settings.json-staging risk mitigated by the explicit-staging rule.

Docs-module slice of #5; the implementer staging rule already landed in #21.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011HosUeuSvhetARboEfDW6K
Reviewer nit (both lenses, non-blocking): "keep max_parallel_workers at 2-3
(already advised)" was imprecise vs the repo's other figures. Reword to point at
the 2-4 ceiling stated earlier in the same section and note the self-adapter ships 2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011HosUeuSvhetARboEfDW6K
@robercano-ghbot
robercano-ghbot merged commit 20b30ba into main Jul 1, 2026
6 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/issue-5-concurrency-doc branch July 1, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document concurrent config-write safety under parallel workers (re: anthropics/claude-code#29217)

2 participants